package com.erik.ipmonitor.repository;

import com.erik.ipmonitor.model.po.Project;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.domain.Page;
import org.springframework.data.repository.query.Param;
import org.springframework.data.domain.Pageable;


/**
 * ProjectRepository
 *
 * @author : erik.zhou
 * @date : 2025/08/25/17:22
 * @description :
 */
public interface ProjectRepository extends JpaRepository<Project, Long> {

    /**
     * 关键词分页查询：模糊匹配多个字段
     * 匹配规则：projectTeam、projectFirstScore、projectTotalScore 中包含 keyword
     */
    Page<Project> findByKeyword(@Param("query") String query, Pageable pageable);
}
